package com.cn.jx.manager.po;

import static com.jx.util.CodeUtil.getRandomId;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.cn.jx.common.entity.BaseEntity;
import com.jx.enumType.YesNoEnum;

/**
 * <p>User 用户表POJO类 对应数据库表名 SYS_USER
 * <p>实现<{@link Serializable <tt>序列化接口</tt>}
 * <p>实现<{@link BaseEntity <tt>BaseEntity</tt>}
 *  
 * @author <h1>jiangxu2  2019年11月21日</h1>
 * @version v1.11.20.2019
 * @since 1.0
 * 
 */
@Entity
@Table(name="SYS_USER")
public class User extends BaseEntity {

	private static final long serialVersionUID = -5287303137498839759L;

	/** <p>登录名<p>设置为{@link String String}类型*/
	@Column(name="login_name",length=64,unique=true,nullable=false)
	private String loginName;
	
	/** <p>员工编码<p>设置为{@link String String}类型*/
	@Column(name="employee_code",length=64,unique=true,nullable=false)
	private String employeeCode;
	
	/** <p>中文名<p>设置为{@link String String}类型*/
	@Column(name="chinese_name",length=100)
	private String chineseName;
	
	/** <p>英文名<p>设置为{@link String String}类型*/
	@Column(name="english_name",length=100)
	private String englishName;
	
	/** <p>是否管理系统登录权限<p>设置为{@link Integer Integer}类型*/
	@Column(name="is_admin")
	private Integer adminFlg;
	
	/** <p>性别<p>设置为{@link String String}类型*/
	@Column(name="sex")
	private String sex;
	
	/** <p>员工类型<p>设置为{@link String String}类型*/
	@Column(name="employee_type")
	private String employeeType;
	
	/** <p>职级<p>设置为{@link String String}类型*/
	@Column(name="job_level")
	private Integer jobLevel;
	
	/** <p>联系人的ID<p>设置为{@link String String}类型*/
	@Column(name="contact_id",length=64)
	private String contactId;
	
	/** <p>初始化创建类 @return */
	public static User getInstance(String operUser){
		Date day=new Date();
		User m=new User();
		m.setId(getRandomId());
		m.setDelFlg(YesNoEnum.NO.getCode());
		m.setValidFlg(YesNoEnum.YES.getCode());
		m.setCreateTime(day);
		m.setOperatTime(day);
		m.setOperatUser(operUser);
		m.setCreateUser(operUser);
		return m;
	}

	/** <p>{@link String String}<p>getContactId()*/
	public String getContactId() {
		return contactId;
	}
	/** <p>{@link String String}<p>getEmployeeCode()*/
	public String getEmployeeCode() {
		return employeeCode;
	}
	/** <p>{@link String String}<p>getAdminFlg()*/
	public Integer getAdminFlg() {
		return adminFlg;
	}
	/** <p>{@link String String}<p>getLoginName()*/
	public String getLoginName() {
		return loginName;
	}
	/** <p>{@link String String}<p>getChineseName()*/
	public String getChineseName() {
		return chineseName;
	}
	/** <p>{@link String String}<p>getEnglishName()*/
	public String getEnglishName() {
		return englishName;
	}
	/** <p>{@link String String getSex()*/
	public String getSex() {
		return sex;
	}
	/** <p>{@link String String getEmployeeType()*/
	public String getEmployeeType() {
		return employeeType;
	}
	/** <p>{@link Integer Integer getJobLevel()*/
	public Integer getJobLevel() {
		return jobLevel;
	}

	/** <p>setContactId({@link String contactId})*/
	public void setContactId(String contactId) {
		this.contactId = contactId;
	}
	/** <p>setEmployeeCode({@link String employeeCode})*/
	public void setEmployeeCode(String employeeCode) {
		this.employeeCode = employeeCode;
	}
	/** <p>setAdminFlg({@link String adminFlg})*/
	public void setAdminFlg(Integer adminFlg) {
		this.adminFlg = adminFlg;
	}
	/** <p>setLoginName({@link String loginName})*/
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	/** <p>setChineseName({@link String chineseName})*/
	public void setChineseName(String chineseName) {
		this.chineseName = chineseName;
	}
	/** <p>setEnglishName({@link String englishName})*/
	public void setEnglishName(String englishName) {
		this.englishName = englishName;
	}
	/** <p>setSex({@link String String sex})*/
	public void setSex(String sex) {
		this.sex = sex;
	}
	/** <p>setEmployeeType({@link String String employeeType})*/
	public void setEmployeeType(String employeeType) {
		this.employeeType = employeeType;
	}
	/** <p>setJobLevel({@link Integer Integer jobLevel})*/
	public void setJobLevel(Integer jobLevel) {
		this.jobLevel = jobLevel;
	}
	
}
